﻿using System;

namespace ToyChat
{
    /// <summary>
    /// Simple container for a <see cref="DisconnectType"/>
    /// </summary>
    public class DisconnectedEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of <see cref="DisconnectedEventArgs"/> and sets the reason to the specified value
        /// </summary>
        /// <param name="reason">The reason for the disconnect</param>
        public DisconnectedEventArgs(DisconnectType reason)
        {
            this.Reason = reason;
        }

        /// <summary>
        /// The <see cref="DisconnectType"/> that describes why the connection was closed
        /// </summary>
        public DisconnectType Reason
        {
            get;
            private set;
        }
    }
}